﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MapLibrary.Players.Damage
{
    /// <summary>
    /// Tuberculosis deals damage over time w/ contact.
    /// </summary>
    class TuberculosisContactDamage : DamageAction
    {
        private int framesPerDamage;
        private int damageCounter;
        private int damageAmount;

        public TuberculosisContactDamage()
        {
            framesPerDamage = 60;
            damageAmount = 10;
        }

        public override void Activate(Player p)
        {
            if (damageCounter >= framesPerDamage)
            {
                p.DealDamage(damageAmount);
                damageCounter = 0;
            }
            else
                damageCounter++;
        }
    }
}
